package com.kma.summer2012.client.view.manager;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.kma.summer2012.client.presenters.manager.WorksCatalogPresenter;
import com.kma.summer2012.client.styles.style2.Recources;
import com.smartgwt.client.widgets.tree.TreeGrid;
//import com.smartgwt.client.widgets.tree.Tree;
//import com.smartgwt.client.types.TreeModelType;
//import com.smartgwt.client.widgets.tree.*;


/**
 * Created with IntelliJ IDEA.
 * User: Администратор
 * Date: 14.02.13
 * Time: 20:32
 * To change this template use File | Settings | File Templates.
 */
public class WorksCatalogView extends Composite implements WorksCatalogPresenter.Display {

    public interface CatalogViewUiBinder extends UiBinder<Widget, WorksCatalogView> {
    }

    private static CatalogViewUiBinder ourUiBinder = GWT.create(CatalogViewUiBinder.class);

    @UiField
    protected TreeGrid catalog;

    public WorksCatalogView() {
        HTMLPanel rootElement = (HTMLPanel) ourUiBinder.createAndBindUi(this);
        catalog.setStyleName(Recources.INSTANCE.styles().listGrid());
        //   catalog.getBaseStyle()
        initWidget(rootElement);
    }

    @Override
    public TreeGrid getTreeGrid() {
        return catalog;
    }


    @Override
    public Widget asWidget() {
        return this;
    }
}